<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>15-location对象</title>
	</head>
	<body>
		<script type="text/javascript">
			//http://www.baidu.com/index.html?sid=10&uid=20
			/**
			 * http 协议 == https
			 * 域名 www.baidu.com
			 * ?后面是参数 使用&连接多个参数（shift+7）
			 */
			var href = window.location.href;
			console.log(href);
			var host = window.location.host;
			console.log(host);
			var port = window.location.port;
			console.log(port);
			var param = window.location.search;
			console.log(param);//?age=10&uid=20
		</script>
	</body>
</html>
